package com.abhinav.designPatterns.proxy;

// Real Subject
public class HighResolutionImage implements Image {
	private String imageFilePath;
	
	public HighResolutionImage(String imageFilePath) {
		this.imageFilePath = imageFilePath;
		loadImage(this.imageFilePath);
	}

	private void loadImage(String imageFilePath) {
		// load Image from disk into memory, this is heavy and costly operation
		System.out.println("HighResolutionImage: loading image from "+imageFilePath);
	}
	
	

	@Override
	public void showImage() {
		// Actual Image rendering logic
		System.out.println("Showing Image.....! "+ imageFilePath);
	}

}
